package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 验收记录
 * </p>
 *
 * @author linan
 * @since 2022-12-28
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value="vsm_check_and_acceptance",autoResultMap = true)
@ApiModel(value = "CheckAndAcceptance", description = "验收记录")
@AllArgsConstructor
public class CheckAndAcceptance extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 场馆综合展会ID
     */
    @ApiModelProperty(value = "场馆综合展会ID")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "场馆综合展会ID")
    private Long exhibitionManageId;

    /**
     * 验收单号
     */
    @ApiModelProperty(value = "验收单号")
    @Size(max = 255, message = "验收单号长度不能超过255")
    @TableField(value = "check_no", condition = LIKE)
    @Excel(name = "验收单号")
    private String checkNo;

    /**
     * 企业类型
     */
    @ApiModelProperty(value = "企业类型")
    @Size(max = 255, message = "企业类型长度不能超过255")
    @TableField(value = "system_type", condition = LIKE)
    @Excel(name = "企业类型")
    private String systemType;

    /**
     * 企业名称
     */
    @ApiModelProperty(value = "企业名称")
    @Size(max = 255, message = "企业名称长度不能超过255")
    @TableField(value = "company_name", condition = LIKE)
    @Excel(name = "企业名称")
    private String companyName;

    /**
     * 申请人姓名
     */
    @ApiModelProperty(value = "申请人姓名")
    @Size(max = 255, message = "申请人姓名长度不能超过255")
    @TableField(value = "application_name", condition = LIKE)
    @Excel(name = "申请人姓名")
    private String applicationName;

    /**
     * 联系方式
     */
    @ApiModelProperty(value = "联系方式")
    @Size(max = 255, message = "联系方式长度不能超过255")
    @TableField(value = "phone", condition = LIKE,typeHandler = M9EncryptHandler.class)
    @Excel(name = "联系方式")
    private String phone;

    /**
     * 验收部门
     */
    @ApiModelProperty(value = "验收部门")
    @Size(max = 255, message = "验收部门长度不能超过255")
    @TableField(value = "org_name", condition = LIKE)
    @Excel(name = "验收部门")
    private String orgName;

    /**
     * 是否赔偿
     */
    @ApiModelProperty(value = "是否赔偿")
    @Size(max = 255, message = "是否赔偿长度不能超过255")
    @TableField(value = "compensate", condition = LIKE)
    @Excel(name = "是否赔偿")
    private String compensate;

    /**
     * 完成状态
     */
    @ApiModelProperty(value = "完成状态")
    @Size(max = 255, message = "完成状态长度不能超过255")
    @TableField(value = "finish_status", condition = LIKE)
    @Excel(name = "完成状态")
    private String finishStatus;

    /**
     * 处理结果
     */
    @ApiModelProperty(value = "处理结果")
    @Size(max = 255, message = "处理结果长度不能超过255")
    @TableField(value = "deal_result", condition = LIKE)
    @Excel(name = "处理结果")
    private String dealResult;


    @Builder
    public CheckAndAcceptance(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    Long exhibitionManageId, String checkNo, String systemType, String companyName, String applicationName, String phone, 
                    String orgName, String compensate, String finishStatus, String dealResult) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.exhibitionManageId = exhibitionManageId;
        this.checkNo = checkNo;
        this.systemType = systemType;
        this.companyName = companyName;
        this.applicationName = applicationName;
        this.phone = phone;
        this.orgName = orgName;
        this.compensate = compensate;
        this.finishStatus = finishStatus;
        this.dealResult = dealResult;
    }

}
